﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Transaction.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the Transaction type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Business.Entities
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// Defines the <seealso cref="Transaction"/> type.
    /// </summary>
    [Serializable]
    public class Transaction
    {
        /// <summary>
        /// Gets or sets the account.
        /// </summary>
        /// <value>
        /// The account.
        /// </value>
        public int Account { get; set; }

        /// <summary>
        /// Gets or sets the transaction id.
        /// </summary>
        /// <value>
        /// The transaction id.
        /// </value>
        public int TransactionId { get; set; }

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>
        /// The title.
        /// </value>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the amount.
        /// </summary>
        /// <value>
        /// The amount.
        /// </value>
        public decimal Amount { get; set; }

        /// <summary>
        /// Gets or sets the details.
        /// </summary>
        /// <value>
        /// The details.
        /// </value>
        public string Details { get; set; }

        /// <summary>
        /// Gets or sets the type of the transaction.
        /// </summary>
        /// <value>
        /// The type of the transaction.
        /// </value>
        public TransactionTypes TransactionType { get; set; }

        /// <summary>
        /// Gets or sets the date.
        /// </summary>
        /// <value>The date of transaction</value>
        public DateTime Date { get; set; }

        /// <summary>
        /// Gets or sets the tags.
        /// </summary>
        /// <value>The tags list</value>
        public IEnumerable<Tag> Tags { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is transfer transaction.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is transfer transaction; otherwise, <c>false</c>.
        /// </value>
        public bool IsTransferTransaction { get; set; }

        /// <summary>
        /// Gets or sets the linked transaction account.
        /// </summary>
        /// <value>
        /// The linked transaction account.
        /// </value>
        public int LinkedTransactionAccount { get; set; }

        /// <summary>
        /// Gets or sets the linked transaction date.
        /// </summary>
        /// <value>
        /// The linked transaction date.
        /// </value>
        public DateTime LinkedTransactionDate { get; set; }

        /// <summary>
        /// Gets or sets the related transaction id.
        /// </summary>
        /// <value>
        /// The related transaction id.
        /// </value>
        public int? RelatedTransactionId { get; set; }
    }
}